package com.xbongbong.saas.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.paas.enums.PlatFormEnum;
import com.xbongbong.pro.enums.permission.enums.ProPermissionAliasEnum;
import com.xbongbong.saas.constant.BasicConstant;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Set;

/**
 * 各业务详情tab按钮
 *
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/1/24 14:54
 * @since v1.0
 */
@Getter
public enum BusinessDetailTabEnum {
    // 客户
    CUSTOMER_BASE_DETAIL(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CUSTOMER_VIEW.getAlias(), "", BasicConstant.ZERO),
    CUSTOMER_PANORAMA(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.PANORAMA, PlatFormEnum.WEB, ProPermissionAliasEnum.CUSTOMER_VIEW.getAlias(), "", BasicConstant.ZERO),
    CUSTOMER_SALE_TEAM(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.CUSTOMER_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.customer_sale_team", BasicConstant.ZERO),
    CUSTOMER_COMMUNICATE_RECORD(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.CUSTOMER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 联系人组织树
    CONTACT_ORGANIZATION_TREE(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.CONTACT_ORGANIZATION_TREE, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CUSTOMER_CALL_LOG(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.CALL_LOG, PlatFormEnum.ALL, null, "enum.businessDetailTab.specialMemo.customer_call_log", BasicConstant.ZERO),
    CUSTOMER_CUSTOMER_STAGE(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.CUSTOMER_STAGE, PlatFormEnum.ALL, ProPermissionAliasEnum.CUSTOMER_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.customer_customer_stage", BasicConstant.ZERO),
    CUSTOMER_SALE_OPPORTUNITY(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.SALE_OPPORTUNITY, PlatFormEnum.WEB, ProPermissionAliasEnum.OPPORTUNITY_VIEW.getAlias(), "", XbbRefTypeEnum.SALES_OPPORTUNITY.getCode()),
    CUSTOMER_QUOTATTIO(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.CUSTOMER_QUOTATION, PlatFormEnum.WEB, ProPermissionAliasEnum.QUOTATION_VIEW.getAlias(),"", XbbRefTypeEnum.QUOTATION.getCode()),
    CUSTOMER_CONTRACT(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.CONTRACT_TAB, PlatFormEnum.WEB, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), "", XbbRefTypeEnum.CONTRACT.getCode()),
    CUSTOMER_WORK_ORDER_LOG(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.WORK_ORDER_LOG, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", XbbRefTypeEnum.WORK_ORDER.getCode()),
    CUSTOMER_WORK_ORDER_V2_LOG(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.WORK_ORDER_V2_LOG, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_V2_VIEW.getAlias(), "", XbbRefTypeEnum.WORK_ORDER_V2.getCode()),
    /**
     * 回款管理权限控制(处理应收款与回款单的查看权限)
     * @author chenshan
     * @Date 2019-11-19 14:17
     */
    CUSTOMER_PAYMENT(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.PAYMENT_MANAGEMENT, PlatFormEnum.ALL, ProPermissionAliasEnum.FUND_MANAGEMENT.getAlias(), "", XbbRefTypeEnum.PAYMENT_MANAGEMENT.getCode()),
    CUSTOMER_INVOICE_HISTORY(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.INVOICE_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    CUSTOMER_CUSTOMER_INVOICE(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.CUSTOMER_INVOICE, PlatFormEnum.ALL, null, "", BasicConstant.ZERO),
    CUSTOMER_CONTACT_TAB(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.CONTACT_TAB, PlatFormEnum.WEB, ProPermissionAliasEnum.CONTACT_VIEW.getAlias(), "", XbbRefTypeEnum.CONTACT.getCode()),
    CUSTOMER_PARENT_AND_CHILD(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.PARENT_AND_CHILD, PlatFormEnum.ALL, null, "", BasicConstant.ZERO),
    CUSTOMER_REFUND(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.REFUND, PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_VIEW.getAlias(), "", XbbRefTypeEnum.REFUND.getCode()),
    CUSTOMER_EXPENSE(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.CUSTOMER_EXPENSE, PlatFormEnum.ALL, ProPermissionAliasEnum.EXPENSE_VIEW.getAlias(), "", XbbRefTypeEnum.EXPENSE.getCode()),
    CUSTOMER_FILE_CABINET(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.CUS_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    CUSTOMER_SMS_SEND_AND_REPLY(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.SMS_SEND_AND_REPLY, PlatFormEnum.WEB, null, "enum.businessDetailTab.specialMemo.customer_sms_send_and_reply", BasicConstant.ZERO),
    //审批记录
    CUSTOMER_APPROVAL_RECORDS(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.CUSTOMER_VIEW.getAlias(), "", BasicConstant.ZERO),
    CUSTOMER_APPROVAL_PROCESS(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CUSTOMER_VIEW.getAlias(), "", BasicConstant.ZERO),
    CUSTOMER_APPROVAL_HISTORY(RedundantTemplateTypeEnum.CUSTOMER.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CUSTOMER_VIEW.getAlias(), "", BasicConstant.ZERO),

    // 联系人
    CONTACT_BASE_DETAIL(XbbRefTypeEnum.CONTACT.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTACT_SALE_TEAM(RedundantTemplateTypeEnum.CONTACT.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTACT_COMMUNICATE_RECORD(XbbRefTypeEnum.CONTACT.getCode(), DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.CUSTOMER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTACT_CALL_LOG(XbbRefTypeEnum.CONTACT.getCode(), DetailTabEnum.CALL_LOG, PlatFormEnum.ALL, null, "enum.businessDetailTab.specialMemo.contact_call_log", BasicConstant.ZERO),
    CONTACT_FILE_CABINET(XbbRefTypeEnum.CONTACT.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTACT_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    CONTACT_SMS_SEND_AND_REPLY(XbbRefTypeEnum.CONTACT.getCode(), DetailTabEnum.SMS_SEND_AND_REPLY, PlatFormEnum.WEB, null, "enum.businessDetailTab.specialMemo.contact_sms_send_and_reply", BasicConstant.ZERO),
    CONTACT_APPROVAL_RECORDS(RedundantTemplateTypeEnum.CONTACT.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTACT_APPROVAL_PROCESS(RedundantTemplateTypeEnum.CONTACT.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTACT_APPROVAL_HISTORY(RedundantTemplateTypeEnum.CONTACT.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 销售机会
    SALES_OPPORTUNITY_DETAIL(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.OPPORTUNITY_VIEW.getAlias(), "" , BasicConstant.ZERO),
    SALES_OPPORTUNITY_SALE_TEAM(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.OPPORTUNITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 机会联系人
    SALES_OPPORTUNITY_CONTACT(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.SALES_OPPORTUNITY_CONTACT, PlatFormEnum.ALL, ProPermissionAliasEnum.OPPORTUNITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    SALES_OPPORTUNITY_COMMUNICATE_RECORD(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.CUSTOMER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    SALES_OPPORTUNITY_COMPETITOR(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(),DetailTabEnum.COMPETITOR,PlatFormEnum.ALL,ProPermissionAliasEnum.COMPETITOR_VIEW.getAlias(),"", BasicConstant.ZERO),
    SALES_OPPORTUNITY_CUSTOMER_STAGE(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.CUSTOMER_STAGE, PlatFormEnum.ALL, ProPermissionAliasEnum.OPPORTUNITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    //SALES_OPPORTUNITY_PRODUCT_LIST(RedundantTemplateTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.OPPORTUNITY_VIEW.getAlias(), ""),
    SALES_OPPORTUNITY_EXPENSE(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.OPPORTUNITY_EXPENSE, PlatFormEnum.ALL, ProPermissionAliasEnum.EXPENSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    SALES_OPPORTUNITY_FILE_CABINET(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.OPP_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    SALES_OPPORTUNITY_WORK_ORDER_LOG(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.WORK_ORDER_LOG, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    SALES_OPPORTUNITY_QUOTATION(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.OPPORTUNITY_QUOTATION, PlatFormEnum.ALL, ProPermissionAliasEnum.QUOTATION_VIEW.getAlias(), "", XbbRefTypeEnum.QUOTATION.getCode()),
    SALES_OPPORTUNITY_CONTRACT(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.CONTRACT_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(),"",  XbbRefTypeEnum.CONTRACT.getCode()),
    SALES_OPPORTUNITY_APPROVAL_RECORDS(RedundantTemplateTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.OPPORTUNITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    SALES_OPPORTUNITY_APPROVAL_PROCESS(RedundantTemplateTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.OPPORTUNITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    SALES_OPPORTUNITY_APPROVAL_HISTORY(RedundantTemplateTypeEnum.SALES_OPPORTUNITY.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.OPPORTUNITY_VIEW.getAlias(), "", BasicConstant.ZERO),

    // 跟进记录
    CUSTOMER_COMMUNICATE_DETAIL(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CUSTOMER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    CUSTOMER_COMMUNICATE_FILE_CABINET(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.CUS_COM_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    CUSTOMER_COMMUNICATE_COMMENT(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), DetailTabEnum.COMMENT, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CUSTOMER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    CUSTOMER_COMMUNICATE_LIKE(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), DetailTabEnum.LIKE, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CUSTOMER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 工作报告
    WORK_REPORT_DETAIL(XbbRefTypeEnum.WORK_REPORT.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_REPORT_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_REPORT_FILE_CABINET(XbbRefTypeEnum.WORK_REPORT.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_REPORT_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    WORK_REPORT_COMMENT(XbbRefTypeEnum.WORK_REPORT.getCode(), DetailTabEnum.COMMENT, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.WORK_REPORT_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_REPORT_LIKE(XbbRefTypeEnum.WORK_REPORT.getCode(), DetailTabEnum.LIKE, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.WORK_REPORT_VIEW.getAlias(), "", BasicConstant.ZERO),

    // 访客计划
    COMMUNICATE_PLAN_DETAIL(XbbRefTypeEnum.COMMUNICATE_PLAN.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.COMMUNICATE_PLAN_VIEW.getAlias(), "", BasicConstant.ZERO),
    COMMUNICATE_PLAN_COMMUNICATE_RECORD(XbbRefTypeEnum.COMMUNICATE_PLAN.getCode(), DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.CUSTOMER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    COMMUNICATE_PLAN_FILE_CABINET(XbbRefTypeEnum.COMMUNICATE_PLAN.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.COM_PLAN_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    // 合同订单
    CONTRACT_BASE_DETAIL(XbbRefTypeEnum.CONTRACT.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_SALE_TEAM(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_COMMUNICATE_RECORD(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.CUSTOMER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_COMPARE(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.CONTRACT_COMPARE, PlatFormEnum.WEB, ProPermissionAliasEnum.CONTRACT_COMPARE_RESULT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_STAGE(XbbRefTypeEnum.CONTRACT.getCode(), DetailTabEnum.CUSTOMER_STAGE, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.contract_stage", BasicConstant.ZERO),

    //CONTRACT_PRODUCT_LIST(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), ""),
    /**
     * 回款管理权限控制(处理应收款与回款单的查看权限)
     * @author chenshan
     * @Date 2019-11-19 14:17
     */
    CONTRACT_PAYMENT(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.PAYMENT_MANAGEMENT, PlatFormEnum.ALL, ProPermissionAliasEnum.FUND_MANAGEMENT.getAlias(), "", XbbRefTypeEnum.PAYMENT_MANAGEMENT.getCode()),
    CONTRACT_INVOICE_HISTORY(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.INVOICE_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),

    CONTRACT_PERFORMANCE(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.PERFORMANCE, PlatFormEnum.WEB, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.contract_performance", BasicConstant.ZERO),
    CONTRACT_EXPENSE(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.CONTRACT_EXPENSE, PlatFormEnum.ALL, ProPermissionAliasEnum.EXPENSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_FILE_CABINET(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_OUTSTOCK_TAB(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.OUTSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_WORK_ORDER_LOG(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.WORK_ORDER_LOG, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", XbbRefTypeEnum.WORK_ORDER.getCode()),
    CONTRACT_WORK_ORDER_V2_LOG(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.WORK_ORDER_V2_LOG, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_V2_VIEW.getAlias(), "", XbbRefTypeEnum.WORK_ORDER_V2.getCode()),
    CONTRACT_REFUND(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.REFUND, PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.contract_refund", XbbRefTypeEnum.REFUND.getCode()),
    CONTRACT_RELEVANCE_PURCHASE(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.CONTRACT_RELEVANCE_PURCHASE, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), "", BasicConstant.ZERO),

    CONTRACT_APPROVAL_RECORDS(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_APPROVAL_APPROVAL_PROCESS(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_APPROVAL_APPROVAL_HISTORY(RedundantTemplateTypeEnum.CONTRACT.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 供应商
    SUPPLIER_BASE_DETAIL(XbbRefTypeEnum.SUPPLIER.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.SUPPLIER_VIEW.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_SALE_TEAM(XbbRefTypeEnum.SUPPLIER.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.SUPPLIER_VIEW.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_COMMUNICATE_RECORD(RedundantTemplateTypeEnum.SUPPLIER.getCode(), DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.SUPPLIER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
   //fix: 27445 【供应商】详情有两个产品的tab
    // SUPPLIER_PRODUCT_LIST(RedundantTemplateTypeEnum.SUPPLIER.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.SUPPLIER_VIEW.getAlias(), ""),
    SUPPLIER_SUPPLIER_PURCHASE(RedundantTemplateTypeEnum.SUPPLIER.getCode(), DetailTabEnum.SUPPLIER_PURCHASE, PlatFormEnum.WEB, ProPermissionAliasEnum.PURCHASE_VIEW.getAlias(), "", XbbRefTypeEnum.PURCHASE_MANAGEMENT.getCode() ),
    SUPPLIER_INVOICE_HISTORY(RedundantTemplateTypeEnum.SUPPLIER.getCode(), DetailTabEnum.INVOICE_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_SUPPLIER_PAYMENT(RedundantTemplateTypeEnum.SUPPLIER.getCode(), DetailTabEnum.PAY_PLAN_MANAGEMENT, PlatFormEnum.ALL, ProPermissionAliasEnum.FUND_MANAGEMENT.getAlias(), "", XbbRefTypeEnum.PAY_MANAGEMENT.getCode() ),
    SUPPLIER_CONTACT_TAB(RedundantTemplateTypeEnum.SUPPLIER.getCode(), DetailTabEnum.SUPPLIER_CONTACT_TAB, PlatFormEnum.WEB, ProPermissionAliasEnum.SUPPLIER_CONTACT_VIEW.getAlias(), "", XbbRefTypeEnum.SUPPLIER_CONTACT.getCode()),
    SUPPLIER_PURCHASE_TAB(RedundantTemplateTypeEnum.SUPPLIER.getCode(), DetailTabEnum.PURCHASE_TAB, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PURCHASE_VIEW.getAlias(), "", XbbRefTypeEnum.PURCHASE_MANAGEMENT.getCode()),
    SUPPLIER_FILE_CABINET(RedundantTemplateTypeEnum.SUPPLIER.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.SUPPLIER_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_APPROVAL_RECORDS(RedundantTemplateTypeEnum.SUPPLIER.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.SUPPLIER_VIEW.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_APPROVAL_PROCESS(RedundantTemplateTypeEnum.SUPPLIER.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.SUPPLIER_VIEW.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_APPROVAL_HISTORY(RedundantTemplateTypeEnum.SUPPLIER.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.SUPPLIER_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 供应商跟进记录
    SUPPLIER_COMMUNICATE_DETAIL(XbbRefTypeEnum.SUPPLIER_COMMUNICATE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.SUPPLIER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_COMMUNICATE_FILE_CABINET(XbbRefTypeEnum.SUPPLIER_COMMUNICATE.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.SUP_COM_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),

    SUPPLIER_COMMUNICATE_COMMENT(XbbRefTypeEnum.SUPPLIER_COMMUNICATE.getCode(), DetailTabEnum.COMMENT, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.SUPPLIER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_COMMUNICATE_LIKE(XbbRefTypeEnum.SUPPLIER_COMMUNICATE.getCode(), DetailTabEnum.LIKE, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.SUPPLIER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 采购合同
    PURCHASE_BASE_DETAIL(XbbRefTypeEnum.PURCHASE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_SALE_TEAM(XbbRefTypeEnum.PURCHASE.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.PURCHASE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_COMMUNICATE_RECORD(RedundantTemplateTypeEnum.PURCHASE.getCode(), DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.SUPPLIER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    //PURCHASE_PRODUCT_LIST(RedundantTemplateTypeEnum.PURCHASE.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_VIEW.getAlias(), ""),
    PURCHASE_SUPPLIER_PAYMENT(RedundantTemplateTypeEnum.PURCHASE.getCode(), DetailTabEnum.PAY_PLAN_MANAGEMENT, PlatFormEnum.ALL, ProPermissionAliasEnum.FUND_MANAGEMENT.getAlias(), "", XbbRefTypeEnum.PAY_MANAGEMENT.getCode()),
    PURCHASE_INVOICE_HISTORY(RedundantTemplateTypeEnum.PURCHASE.getCode(), DetailTabEnum.INVOICE_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_INSTOCK_TAB(RedundantTemplateTypeEnum.PURCHASE.getCode(), DetailTabEnum.INSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_RETURNED_PURCHASE(RedundantTemplateTypeEnum.PURCHASE.getCode(), DetailTabEnum.PURCHASE_RETURNED, PlatFormEnum.ALL, ProPermissionAliasEnum.RETURN_PURCHASE_VIEW.getAlias(), "", XbbRefTypeEnum.RETURNED_PURCHASE.getCode()),
    PURCHASE_FILE_CABINET(RedundantTemplateTypeEnum.PURCHASE.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_APPROVAL_RECORDS(RedundantTemplateTypeEnum.PURCHASE.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.PURCHASE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_APPROVAL_PROCESS(RedundantTemplateTypeEnum.PURCHASE.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PURCHASE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_APPROVAL_HISTORY(RedundantTemplateTypeEnum.PURCHASE.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PURCHASE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_CONTRACT_COMPARE(RedundantTemplateTypeEnum.PURCHASE.getCode(), DetailTabEnum.CONTRACT_COMPARE, PlatFormEnum.WEB, ProPermissionAliasEnum.CONTRACT_COMPARE_RESULT_VIEW.getAlias(), "", BasicConstant.ZERO),

    // 采购退货
    RETURNED_PURCHASE_BASE_DETAIL(XbbRefTypeEnum.RETURNED_PURCHASE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.RETURN_PURCHASE_VIEW.getAlias(), "", BasicConstant.ZERO),
    //RETURNED_PURCHASE_PRODUCT_LIST(RedundantTemplateTypeEnum.RETURNED_PURCHASE.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.RETURN_PURCHASE_VIEW.getAlias(), ""),
    RETURNED_PURCHASE_OUTSTOCK_TAB(RedundantTemplateTypeEnum.RETURNED_PURCHASE.getCode(), DetailTabEnum.OUTSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.RETURNED_PURCHASE_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURNED_PURCHASE_FILE_CABINET(RedundantTemplateTypeEnum.RETURNED_PURCHASE.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.RE_PURCHASE_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    RETURNED_PURCHASE_RED_PAY_SHEET(RedundantTemplateTypeEnum.RETURNED_PURCHASE.getCode(), DetailTabEnum.RED_PAY_SHEET, PlatFormEnum.ALL, ProPermissionAliasEnum.PAY_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),

    RETURNED_PURCHASE_RELEVANT_INVALID_INVOICE(RedundantTemplateTypeEnum.RETURNED_PURCHASE.getCode(), DetailTabEnum.RELEVANT_INVALID_PURCHASE_INVOICE, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURNED_PURCHASE_APPROVAL_RECORDS(RedundantTemplateTypeEnum.RETURNED_PURCHASE.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.RETURN_PURCHASE_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURNED_PURCHASE_APPROVAL_PROCESS(RedundantTemplateTypeEnum.RETURNED_PURCHASE.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.RETURN_PURCHASE_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURNED_PURCHASE_APPROVAL_HISTORY(RedundantTemplateTypeEnum.RETURNED_PURCHASE.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.RETURN_PURCHASE_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 回款管理
    PAYMENT_BASE_DETAIL(XbbRefTypeEnum.PAYMENT.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PAYMENT_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAYMENT_SALE_TEAM(RedundantTemplateTypeEnum.PAYMENT.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.PAYMENT_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.payment_sale_team", BasicConstant.ZERO),
    PAYMENT_PAYMENT_SHEET(RedundantTemplateTypeEnum.PAYMENT.getCode(), DetailTabEnum.PAYMENT_SHEET, PlatFormEnum.ALL, ProPermissionAliasEnum.PAYMENT_SHEET_VIEW.getAlias(), "", XbbRefTypeEnum.PAYMENT_SHEET.getCode()),
    PAYMENT_RED_HISTORY(RedundantTemplateTypeEnum.PAYMENT.getCode(),DetailTabEnum.RED_RECEIVABLES_HISTORY,PlatFormEnum.ALL,ProPermissionAliasEnum.PAYMENT_VIEW.getAlias(),"", BasicConstant.ZERO),
    PAYMENT_INVOICE_HISTORY(RedundantTemplateTypeEnum.PAYMENT.getCode(), DetailTabEnum.INVOICE_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAYMENT_FILE_CABINET(RedundantTemplateTypeEnum.PAYMENT.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.PAYMENT_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    //PAYMENT_APPROVAL_RECORDS(RedundantTemplateTypeEnum.PAYMENT.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.PAYMENT_VIEW.getAlias(), "", BasicConstant.ZERO),
    //PAYMENT_APPROVAL_PROCESS(RedundantTemplateTypeEnum.PAYMENT.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PAYMENT_VIEW.getAlias(), "", BasicConstant.ZERO),
    //PAYMENT_APPROVAL_HISTORY(RedundantTemplateTypeEnum.PAYMENT.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PAYMENT_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 信用管理
    CREDIT_LIMIT_DETAIL(XbbRefTypeEnum.CREDIT_LIMIT.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CREDIT_LIMIT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CREDIT_TEMPORARY_RECORD(XbbRefTypeEnum.CREDIT_LIMIT.getCode(), DetailTabEnum.CREDIT_TEMPORARY_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.CREDIT_TEMPORARY_LIMIT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CREDIT_FIXED_RECORD(XbbRefTypeEnum.CREDIT_LIMIT.getCode(), DetailTabEnum.CREDIT_FIXED_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.CREDIT_FIXED_LIMIT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CREDIT_CARD_BILL_RECORD(XbbRefTypeEnum.CREDIT_LIMIT.getCode(), DetailTabEnum.CREDIT_CARD_BILL_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.CREDIT_CARD_BILL_VIEW.getAlias(), "", BasicConstant.ZERO),
    CREDIT_TEMPORARY_LIMIT(XbbRefTypeEnum.CREDIT_TEMPORARY_LIMIT.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CREDIT_TEMPORARY_LIMIT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CREDIT_FIXED_LIMIT(XbbRefTypeEnum.CREDIT_FIXED_LIMIT.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CREDIT_FIXED_LIMIT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CREDIT_CARD_BILL(XbbRefTypeEnum.CREDIT_CARD_BILL.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CREDIT_CARD_BILL_VIEW.getAlias(), "", BasicConstant.ZERO),
    CREDIT_LIMIT_APPROVAL_RECORDS(RedundantTemplateTypeEnum.CREDIT_LIMIT.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.CREDIT_LIMIT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CREDIT_LIMIT_APPROVAL_PROCESS(RedundantTemplateTypeEnum.CREDIT_LIMIT.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CREDIT_LIMIT_VIEW.getAlias(), "", BasicConstant.ZERO),
    CREDIT_LIMIT_APPROVAL_HISTORY(RedundantTemplateTypeEnum.CREDIT_LIMIT.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CREDIT_LIMIT_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 付款计划
    PAY_PLAN_BASE_DETAIL(XbbRefTypeEnum.PAY_PLAN.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PAY_PLAN_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAY_PLAN_SALE_TEAM(RedundantTemplateTypeEnum.PAY_PLAN.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.PAY_PLAN_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.pay_plan_sale_team", BasicConstant.ZERO),
    PAY_PLAN_PAY_SHEET(RedundantTemplateTypeEnum.PAY_PLAN.getCode(), DetailTabEnum.PAY_SHEET, PlatFormEnum.ALL, ProPermissionAliasEnum.PAY_SHEET_VIEW.getAlias(), "", XbbRefTypeEnum.PAY_SHEET.getCode()),
    PAY_PLAN_FILE_CABINET(RedundantTemplateTypeEnum.PAY_PLAN.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.PAY_PLAN_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    /**
     * 新增一个tab，开票历史
     */
    PAY_PLAN_INVOICE_HISTORY(RedundantTemplateTypeEnum.PAY_PLAN.getCode(), DetailTabEnum.INVOICE_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    //PAY_PLAN_APPROVAL_RECORDS(XbbRefTypeEnum.PAY_PLAN.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.PAY_PLAN_VIEW.getAlias(), "", BasicConstant.ZERO),
    //PAY_PLAN_APPROVAL_PROCESS(XbbRefTypeEnum.PAY_PLAN.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PAY_PLAN_VIEW.getAlias(), "", BasicConstant.ZERO),
    //PAY_PLAN_APPROVAL_HISTORY(XbbRefTypeEnum.PAY_PLAN.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PAY_PLAN_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 发票管理
    INVOICE_BASE_DETAIL(XbbRefTypeEnum.INVOICE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    INVOICE_CUSTOMER_INVOICE(RedundantTemplateTypeEnum.INVOICE.getCode(), DetailTabEnum.CUSTOMER_INVOICE, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    INVOICE_RED_INVOICE(RedundantTemplateTypeEnum.INVOICE.getCode(), DetailTabEnum.RED_INVOICE, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.invoice_red_invoice", XbbRefTypeEnum.RED_INVOICE.getCode()),
    INVOICE_FILE_CABINET(RedundantTemplateTypeEnum.INVOICE.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    INVOICE_APPROVAL_RECORDS(XbbRefTypeEnum.INVOICE.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    INVOICE_APPROVAL_PROCESS(RedundantTemplateTypeEnum.INVOICE.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    INVOICE_APPROVAL_HISTORY(RedundantTemplateTypeEnum.INVOICE.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 发票管理
    PURCHASE_INVOICE_BASE_DETAIL(XbbRefTypeEnum.PURCHASE_INVOICE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_INVOICE_CUSTOMER_INVOICE(RedundantTemplateTypeEnum.PURCHASE_INVOICE.getCode(), DetailTabEnum.CUSTOMER_INVOICE, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_INVOICE_RED_INVOICE(RedundantTemplateTypeEnum.PURCHASE_INVOICE.getCode(), DetailTabEnum.RED_INVOICE, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_INVOICE_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.invoice_red_invoice", BasicConstant.ZERO),
    PURCHASE_INVOICE_FILE_CABINET(RedundantTemplateTypeEnum.PURCHASE_INVOICE.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.PUR_INVOICE_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_INVOICE_APPROVAL_RECORDS(XbbRefTypeEnum.PURCHASE_INVOICE.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.PURCHASE_INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_INVOICE_APPROVAL_PROCESS(RedundantTemplateTypeEnum.PURCHASE_INVOICE.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PURCHASE_INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_INVOICE_APPROVAL_HISTORY(RedundantTemplateTypeEnum.PURCHASE_INVOICE.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PURCHASE_INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 产品
    PRODUCT_BASE_DETAIL(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.PRODUCT_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PRODUCT_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCT_STOCK_TAB(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.STOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.WAREHOUSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCT_PERSON_TAB(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.PERSON_TAB, PlatFormEnum.WEB, ProPermissionAliasEnum.PRODUCT_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCT_SUPPLIER_TAB(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.SUPPLIER_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.SUPPLIER_VIEW.getAlias(), "", XbbRefTypeEnum.SUPPLIER.getCode()),
    PRODUCT_PURCHASE_TAB(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.PURCHASE_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_VIEW.getAlias(), "", XbbRefTypeEnum.PURCHASE.getCode()),
    PRODUCT_CONTRACT_TAB(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.PRODUCT_CONTRACT_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), "", XbbRefTypeEnum.CONTRACT.getCode()),
    PRODUCT_INSTOCK_TAB(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.PRODUCT_INSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCT_OUTSTOCK_TAB(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.PRODUCT_OUTSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCT_BATCH_TAB(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.BATCH_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCT_GUARANTEE_TAB(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.GUARANTEE_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCT_REFUND(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.REFUND, PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_VIEW.getAlias(), "仅当产品有退货退款时展示", XbbRefTypeEnum.REFUND.getCode()),
    PRODUCT_FILE_CABINET(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.PRODUCT_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    PRODUCT_INSTRUCTION(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.RICH_TEXT, PlatFormEnum.ALL, ProPermissionAliasEnum.PRODUCT_VIEW.getAlias(), "", BasicConstant.ZERO),
    //PRODUCT_APPROVAL_RECORDS(XbbRefTypeEnum.PRODUCT.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.PRODUCT_VIEW.getAlias(), "", BasicConstant.ZERO),
    //PRODUCT_APPROVAL_PROCESS(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PRODUCT_VIEW.getAlias(), "", BasicConstant.ZERO),
    //PRODUCT_APPROVAL_HISTORY(RedundantTemplateTypeEnum.PRODUCT.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PRODUCT_VIEW.getAlias(), "", BasicConstant.ZERO),
    // BOM清单
    BOM_BASE_DETAIL(RedundantTemplateTypeEnum.BOMBILL.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.BOM_BILL_VIEW.getAlias(), "", BasicConstant.ZERO),
    BOM_SALE_TEAM(RedundantTemplateTypeEnum.BOMBILL.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.BOM_BILL_VIEW.getAlias(), "", BasicConstant.ZERO),
    //BOM_PRODUCT_LIST(RedundantTemplateTypeEnum.BOMBILL.getCode(), DetailTabEnum.MULTI_PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.BOM_BILL_VIEW.getAlias(), ""),
    BOM_STRUCTURE(RedundantTemplateTypeEnum.BOMBILL.getCode(), DetailTabEnum.STRUCTURE, PlatFormEnum.ALL, ProPermissionAliasEnum.BOM_BILL_VIEW.getAlias(), "", BasicConstant.ZERO),
    BOM_FILE_CABINET(RedundantTemplateTypeEnum.BOMBILL.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.BOM_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    BOMBILL_APPROVAL_RECORDS(RedundantTemplateTypeEnum.BOMBILL.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.BOM_BILL_VIEW.getAlias(), "", BasicConstant.ZERO),
    BOMBILL_APPROVAL_PROCESS(RedundantTemplateTypeEnum.BOMBILL.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.BOM_BILL_VIEW.getAlias(), "", BasicConstant.ZERO),
    BOMBILL_APPROVAL_HISTORY(RedundantTemplateTypeEnum.BOMBILL.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.BOM_BILL_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 生产单
    PRODUCTION_ORDER_BASE_DETAIL(RedundantTemplateTypeEnum.PRODUCTIONORDER.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PRODUCTION_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCTION_ORDER_SALE_TEAM(RedundantTemplateTypeEnum.PRODUCTIONORDER.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.PRODUCTION_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    //PRODUCTION_ORDER_PRODUCT_LIST(RedundantTemplateTypeEnum.PRODUCTIONORDER.getCode(), DetailTabEnum.MULTI_PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.PRODUCTION_ORDER_VIEW.getAlias(), ""),
    PRODUCTION_ORDER_INSTOCK_TAB(RedundantTemplateTypeEnum.PRODUCTIONORDER.getCode(), DetailTabEnum.INSTOCK_TAB, PlatFormEnum.ALL, null, "", BasicConstant.ZERO),
    PRODUCTION_ORDER_OUTSTOCK_TAB(RedundantTemplateTypeEnum.PRODUCTIONORDER.getCode(), DetailTabEnum.OUTSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PRODUCTION_MATERIEL_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCTION_ORDER_FILE_CABINET(RedundantTemplateTypeEnum.PRODUCTIONORDER.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.PRO_ORDER_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    PRODUCTIONORDER_APPROVAL_RECORDS(RedundantTemplateTypeEnum.PRODUCTIONORDER.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.PRODUCTION_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCTIONORDER_APPROVAL_PROCESS(RedundantTemplateTypeEnum.PRODUCTIONORDER.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PRODUCTION_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCTIONORDER_APPROVAL_HISTORY(RedundantTemplateTypeEnum.PRODUCTIONORDER.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PRODUCTION_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 盘点单
    INVENTORY_BASE_DETAIL(RedundantTemplateTypeEnum.INVENTORY.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.INVENTORY_VIEW.getAlias(), "", BasicConstant.ZERO),
    //INVENTORY_PRODUCT_LIST(RedundantTemplateTypeEnum.INVENTORY.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.INVENTORY_VIEW.getAlias(), ""),
    INVENTORY_INSTOCK_TAB(RedundantTemplateTypeEnum.INVENTORY.getCode(), DetailTabEnum.INSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    INVENTORY_OUTSTOCK_TAB(RedundantTemplateTypeEnum.INVENTORY.getCode(), DetailTabEnum.OUTSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    INVENTORY_FILE_CABINET(RedundantTemplateTypeEnum.INVENTORY.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.INVENTORY_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    INVENTORY_APPROVAL_RECORDS(XbbRefTypeEnum.INVENTORY.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.INVENTORY_VIEW.getAlias(), "", BasicConstant.ZERO),
    INVENTORY_APPROVAL_PROCESS(RedundantTemplateTypeEnum.INVENTORY.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.INVENTORY_VIEW.getAlias(), "", BasicConstant.ZERO),
    INVENTORY_APPROVAL_HISTORY(RedundantTemplateTypeEnum.INVENTORY.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.INVENTORY_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 调拨单
    TRANSFER_BASE_DETAIL(RedundantTemplateTypeEnum.TRANSFER.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.TRANSFER_VIEW.getAlias(), "", BasicConstant.ZERO),
    //TRANSFER_PRODUCT_LIST(RedundantTemplateTypeEnum.TRANSFER.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.TRANSFER_VIEW.getAlias(), ""),
    TRANSFER_INSTOCK_TAB(RedundantTemplateTypeEnum.TRANSFER.getCode(), DetailTabEnum.INSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    TRANSFER_OUTSTOCK_TAB(RedundantTemplateTypeEnum.TRANSFER.getCode(), DetailTabEnum.OUTSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    TRANSFER_FILE_CABINET(RedundantTemplateTypeEnum.TRANSFER.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.TRANSFER_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    TRANSFER_APPROVAL_RECORDS(XbbRefTypeEnum.TRANSFER.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.TRANSFER_VIEW.getAlias(), "", BasicConstant.ZERO),
    TRANSFER_APPROVAL_PROCESS(RedundantTemplateTypeEnum.TRANSFER.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.TRANSFER_VIEW.getAlias(), "", BasicConstant.ZERO),
    TRANSFER_APPROVAL_HISTORY(RedundantTemplateTypeEnum.TRANSFER.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.TRANSFER_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 入库单
    INSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.INSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    //INSTOCK_PRODUCT_LIST(RedundantTemplateTypeEnum.INSTOCK.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), ""),
    INSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.INSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.INSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    INSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.INSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    INSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.INSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    INSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.INSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),

    PURCHASE_INSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.PURCHASE_INSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_INSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.PURCHASE_INSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.PUINSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_INSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.PURCHASE_INSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.PURCHASE_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_INSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.PURCHASE_INSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PURCHASE_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_INSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.PURCHASE_INSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PURCHASE_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),

    REFUND_INSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.REFUND_INSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    REFUND_INSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.REFUND_INSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.REINSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    REFUND_INSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.REFUND_INSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.REFUND_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    REFUND_INSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.REFUND_INSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.REFUND_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    REFUND_INSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.REFUND_INSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.REFUND_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),

    OTHER_INSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.OTHER_INSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_INSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.OTHER_INSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.INSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    OTHER_INSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.OTHER_INSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_INSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.OTHER_INSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_INSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.OTHER_INSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),

    PRODUCTION_INSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.PRODUCTION_INSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PRODUCTION_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCTION_INSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.PRODUCTION_INSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.PRINSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    PRODUCTION_INSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.PRODUCTION_INSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.PRODUCTION_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCTION_INSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.PRODUCTION_INSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PRODUCTION_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCTION_INSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.PRODUCTION_INSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PRODUCTION_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),

    RETURNED_MATERIEL_INSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.RETURNED_MATERIEL_INSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.RETURNED_MATERIEL_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURNED_MATERIEL_INSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.RETURNED_MATERIEL_INSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.RMINSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    RETURNED_MATERIEL_INSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.RETURNED_MATERIEL_INSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.RETURNED_MATERIEL_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURNED_MATERIEL_INSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.RETURNED_MATERIEL_INSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.RETURNED_MATERIEL_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURNED_MATERIEL_INSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.RETURNED_MATERIEL_INSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.RETURNED_MATERIEL_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),

    // 出库单
    OUTSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.OUTSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    //OUTSTOCK_PRODUCT_LIST(RedundantTemplateTypeEnum.OUTSTOCK.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), ""),
    OUTSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.OUTSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.OUTSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    OUTSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    OUTSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    OUTSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),

    CONTRACT_OUTSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.CONTRACT_OUTSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_OUTSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.CONTRACT_OUTSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.COOUTSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_OUTSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.CONTRACT_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.CONTRACT_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_OUTSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.CONTRACT_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CONTRACT_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_OUTSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.CONTRACT_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CONTRACT_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),


    RETURNED_PURCHASE_OUTSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.RETURNED_PURCHASE_OUTSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.RETURNED_PURCHASE_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURNED_PURCHASE_OUTSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.RETURNED_PURCHASE_OUTSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.RPOUTSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    RETURNED_PURCHASE_OUTSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.RETURNED_PURCHASE_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.RETURNED_PURCHASE_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURNED_PURCHASE_OUTSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.RETURNED_PURCHASE_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.RETURNED_PURCHASE_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURNED_PURCHASE_OUTSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.RETURNED_PURCHASE_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.RETURNED_PURCHASE_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),


    OTHER_OUTSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.OTHER_OUTSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_OUTSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.OTHER_OUTSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.OUTSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    OTHER_OUTSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.OTHER_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_OUTSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.OTHER_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_OUTSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.OTHER_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),


    PRODUCTION_MATERIEL_OUTSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.PRODUCTION_MATERIEL_OUTSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PRODUCTION_MATERIEL_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCTION_MATERIEL_OUTSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.PRODUCTION_MATERIEL_OUTSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.PMOUTSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    PRODUCTION_MATERIEL_OUTSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.PRODUCTION_MATERIEL_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.PRODUCTION_MATERIEL_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCTION_MATERIEL_OUTSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.PRODUCTION_MATERIEL_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PRODUCTION_MATERIEL_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    PRODUCTION_MATERIEL_OUTSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.PRODUCTION_MATERIEL_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PRODUCTION_MATERIEL_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),


    WORK_ORDER_OUTSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.WORK_ORDER_OUTSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_OUTSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.WORK_ORDER_OUTSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.WOOUTSTOCK_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_OUTSTOCK_APPROVAL_RECORDS(XbbRefTypeEnum.WORK_ORDER_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.WORK_ORDER_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_OUTSTOCK_APPROVAL_PROCESS(RedundantTemplateTypeEnum.WORK_ORDER_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.WORK_ORDER_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_OUTSTOCK_APPROVAL_HISTORY(RedundantTemplateTypeEnum.WORK_ORDER_OUTSTOCK.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.WORK_ORDER_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),


    // 装配单
    ASSEMBLE_BASE_DETAIL(RedundantTemplateTypeEnum.ASSEMBLE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.ASSEMBLE_VIEW.getAlias(), "", BasicConstant.ZERO),
    //ASSEMBLE_INSTOCK_OUTSTOCK_PRODUCT_LIST(RedundantTemplateTypeEnum.ASSEMBLE.getCode(), DetailTabEnum.IN_AND_OUT_PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.ASSEMBLE_VIEW.getAlias(), ""),
    ASSEMBLE_OUTSTOCK_INSTOCK_TAB(RedundantTemplateTypeEnum.ASSEMBLE.getCode(), DetailTabEnum.INSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    ASSEMBLE_OUTSTOCK_OUTSTOCK_TAB(RedundantTemplateTypeEnum.ASSEMBLE.getCode(), DetailTabEnum.OUTSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    ASSEMBLE_FILE_CABINET(RedundantTemplateTypeEnum.ASSEMBLE.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.ASSEMBLE_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    ASSEMBLE_APPROVAL_RECORDS(XbbRefTypeEnum.ASSEMBLE.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.ASSEMBLE_VIEW.getAlias(), "", BasicConstant.ZERO),
    ASSEMBLE_APPROVAL_PROCESS(RedundantTemplateTypeEnum.ASSEMBLE.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.ASSEMBLE_VIEW.getAlias(), "", BasicConstant.ZERO),
    ASSEMBLE_APPROVAL_HISTORY(RedundantTemplateTypeEnum.ASSEMBLE.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.ASSEMBLE_VIEW.getAlias(), "", BasicConstant.ZERO),


    // 联系人
    SUPPLIER_CONTACT_BASE_DETAIL(XbbRefTypeEnum.SUPPLIER_CONTACT.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.SUPPLIER_CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_CONTACT_TEAM(XbbRefTypeEnum.SUPPLIER_CONTACT.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.SUPPLIER_CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_CONTACT_FILE_CABINET(XbbRefTypeEnum.SUPPLIER_CONTACT.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.SUP_CONTACT_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_CONTACT_APPROVAL_RECORDS(XbbRefTypeEnum.SUPPLIER_CONTACT.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.SUPPLIER_CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_CONTACT_APPROVAL_PROCESS(RedundantTemplateTypeEnum.SUPPLIER_CONTACT.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.SUPPLIER_CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    SUPPLIER_CONTACT_APPROVAL_HISTORY(RedundantTemplateTypeEnum.SUPPLIER_CONTACT.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.SUPPLIER_CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),


    // 仓库
    WAREHOUSE_BASE_DETAIL(XbbRefTypeEnum.WAREHOUSE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.WAREHOUSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    WAREHOUSE_FILE_CABINET(XbbRefTypeEnum.WAREHOUSE.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.WAREHOUSE_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    WAREHOUSE_ORI_STOCK(XbbRefTypeEnum.WAREHOUSE.getCode(),DetailTabEnum.ORI_STOCK,PlatFormEnum.WEB, ProPermissionAliasEnum.WAREHOUSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    // 退货退款
    REFUND_BASE_DETAIL(XbbRefTypeEnum.REFUND.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_VIEW.getAlias(), "", BasicConstant.ZERO),
    REFUND_SALE_TEAM(RedundantTemplateTypeEnum.REFUND.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.REFUND_VIEW.getAlias(), "", BasicConstant.ZERO),
    //REFUND_PRODUCT_LIST(RedundantTemplateTypeEnum.REFUND.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_VIEW.getAlias(), ""),
    REFUND_RED_PAYMENT_SHEET(RedundantTemplateTypeEnum.REFUND.getCode(), DetailTabEnum.RED_PAYMENT_SHEET, PlatFormEnum.ALL, ProPermissionAliasEnum.PAYMENT_SHEET_VIEW.getAlias(), "", XbbRefTypeEnum.RED_PAYMENT_SHEET.getCode()),

    REFUND_RELEVANT_INVALID_INVOICE(RedundantTemplateTypeEnum.REFUND.getCode(), DetailTabEnum.RELEVANT_INVALID_INVOICE, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),

    REFUND_RED_PAYMENT(RedundantTemplateTypeEnum.REFUND.getCode(), DetailTabEnum.RED_PAYMENT, PlatFormEnum.ALL, ProPermissionAliasEnum.RED_RECEIVABLES.getAlias(), "", XbbRefTypeEnum.PAYMENT.getCode()),

    REFUND_PERFORMANCE(RedundantTemplateTypeEnum.REFUND.getCode(), DetailTabEnum.PERFORMANCE, PlatFormEnum.WEB, ProPermissionAliasEnum.REFUND_VIEW.getAlias(), "仅在开启业绩分配时展示", BasicConstant.ZERO),
    REFUND_INSTOCK_TAB(RedundantTemplateTypeEnum.REFUND.getCode(), DetailTabEnum.INSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    REFUND_FILE_CABINET(RedundantTemplateTypeEnum.REFUND.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    REFUND_APPROVAL_RECORDS(XbbRefTypeEnum.REFUND.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.REFUND_VIEW.getAlias(), "", BasicConstant.ZERO),
    REFUND_APPROVAL_PROCESS(RedundantTemplateTypeEnum.REFUND.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.REFUND_VIEW.getAlias(), "", BasicConstant.ZERO),
    REFUND_APPROVAL_HISTORY(RedundantTemplateTypeEnum.REFUND.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.REFUND_VIEW.getAlias(), "", BasicConstant.ZERO),

    //工单
    WORK_ORDER_CENTER_BASE_DETAIL(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_CENTER_SALE_TEAM(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_PROGRESS(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.WORK_ORDER_PROGRESS, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    //WORK_ORDER_CENTER_PRODUCT_IMPLEMENTATION(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), ""),
    WORK_ORDER_CENTER_WORK_ORDER_OUTSTOCK(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.OUTSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_CENTER_WORK_ORDER_DYNAMIC(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.WORK_ORDER_DYNAMIC, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_CENTER_WORK_ORDER_EVALUATION(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.WORK_ORDER_EVALUATION, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_RATE.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_CENTER_WORK_ORDER_CC(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.WORK_ORDER_CC, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_CENTER_FILE_CABINET(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_SMS_SEND_AND_REPLY(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.SMS_SEND_AND_REPLY, PlatFormEnum.WEB, null, "enum.businessDetailTab.specialMemo.work_order_sms_send_and_reply", BasicConstant.ZERO),
    WORK_ORDER_APPROVAL_RECORDS(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_APPROVAL_PROCESS(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    WORK_ORDER_APPROVAL_HISTORY(XbbRefTypeEnum.WORK_ORDER.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),

    //报价单
    QUOTATION_BASE_DETATL(XbbRefTypeEnum.QUOTATION.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.QUOTATION_VIEW.getAlias(), "", BasicConstant.ZERO),
    QUOTATION_SALE_TEAM(XbbRefTypeEnum.QUOTATION.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.QUOTATION_VIEW.getAlias(), "", BasicConstant.ZERO),
    QUOTATION_COMMUNICATE_RECORD(XbbRefTypeEnum.QUOTATION.getCode(),  DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.QUOTATION_VIEW.getAlias(), "", BasicConstant.ZERO),
    //QUOTATION_PRODUCT_LIST(XbbRefTypeEnum.QUOTATION.getCode(), DetailTabEnum.PRODUCT_LIST, PlatFormEnum.ALL, ProPermissionAliasEnum.QUOTATION_VIEW.getAlias(), ""),
    QUOTATION_VERSION_LIST(XbbRefTypeEnum.QUOTATION.getCode(), DetailTabEnum.VERSION_LIST, PlatFormEnum.ALL,ProPermissionAliasEnum.QUOTATION_VIEW.getAlias(), "", BasicConstant.ZERO),
    QUOTATION_FILE_CABINET(XbbRefTypeEnum.QUOTATION.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL,ProPermissionAliasEnum.QUOTATION_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    QUOTATION_APPROVAL_RECORDS(XbbRefTypeEnum.QUOTATION.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.QUOTATION_VIEW.getAlias(), "", BasicConstant.ZERO),
    QUOTATION_APPROVAL_PROCESS(RedundantTemplateTypeEnum.QUOTATION.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.QUOTATION_VIEW.getAlias(), "", BasicConstant.ZERO),
    QUOTATION_APPROVAL_HISTORY(RedundantTemplateTypeEnum.QUOTATION.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.QUOTATION_VIEW.getAlias(), "", BasicConstant.ZERO),

    // 回款单
    PAYMENT_SHEET_BASE_DETAIL(XbbRefTypeEnum.PAYMENT_SHEET.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PAYMENT_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAYMENT_SHEET_SALE_TEAM(RedundantTemplateTypeEnum.PAYMENT_SHEET.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.PAYMENT_SHEET_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.payment_sheet_sale_team", BasicConstant.ZERO),
    PAYMENT_SHEET_INVOICE_HISTORY(XbbRefTypeEnum.PAYMENT_SHEET.getCode(), DetailTabEnum.INVOICE_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAYMENT_SHEET_RED_HISTORY(XbbRefTypeEnum.PAYMENT_SHEET.getCode(), DetailTabEnum.PAYMENT_SHEET_RED_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.PAYMENT_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAYMENT_SHEET_CABINET(RedundantTemplateTypeEnum.PAYMENT_SHEET.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.PAYMENT_SHEET_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    PAYMENT_SHEET_APPROVAL_RECORDS(XbbRefTypeEnum.PAYMENT_SHEET.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.PAYMENT_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAYMENT_SHEET_APPROVAL_PROCESS(RedundantTemplateTypeEnum.PAYMENT_SHEET.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PAYMENT_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAYMENT_SHEET_APPROVAL_HISTORY(RedundantTemplateTypeEnum.PAYMENT_SHEET.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PAYMENT_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),

    // 付款单
    PAY_SHEET_BASE_DETAIL(XbbRefTypeEnum.PAY_SHEET.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PAY_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAY_SHEET_SALE_TEAM(RedundantTemplateTypeEnum.PAY_SHEET.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.PAY_SHEET_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.pay_sheet_sale_team", BasicConstant.ZERO),
    PAY_SHEET_INVOICE_HISTORY(XbbRefTypeEnum.PAY_SHEET.getCode(), DetailTabEnum.INVOICE_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAY_SHEET_RED_HISTORY(XbbRefTypeEnum.PAY_SHEET.getCode(), DetailTabEnum.PAY_SHEET_RED_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.PAY_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAY_SHEET_CABINET(RedundantTemplateTypeEnum.PAY_SHEET.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.PAY_SHEET_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    PAY_SHEET_APPROVAL_RECORDS(XbbRefTypeEnum.PAY_SHEET.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.PAY_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAY_SHEET_APPROVAL_PROCESS(RedundantTemplateTypeEnum.PAY_SHEET.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PAY_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),
    PAY_SHEET_APPROVAL_HISTORY(RedundantTemplateTypeEnum.PAY_SHEET.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.PAY_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),

    //预收款余额
    PREPAYMENT_AND_VERIFY(XbbRefTypeEnum.PREPAYMENT_BALANCE.getCode(), DetailTabEnum.PREPAYMENT_AND_VERIFY, PlatFormEnum.ALL, ProPermissionAliasEnum.PAYMENT_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),
    CONTRACT_VERIFY(XbbRefTypeEnum.PREPAYMENT_BALANCE.getCode(), DetailTabEnum.CONTRACT_VERIFY, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    //预付款余额
    PREPAY_AND_VERIFY(XbbRefTypeEnum.PREPAY_BALANCE.getCode(), DetailTabEnum.PREPAY_AND_VERIFY, PlatFormEnum.ALL, ProPermissionAliasEnum.PAY_SHEET_VIEW.getAlias(), "", BasicConstant.ZERO),
    PURCHASE_VERIFY(XbbRefTypeEnum.PREPAY_BALANCE.getCode(), DetailTabEnum.PURCHASE_VERIFY, PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_VIEW.getAlias(), "", BasicConstant.ZERO),

    // 报销单
    REIMBURSEMENT_FORM_DETAIL(XbbRefTypeEnum.REIMBURSEMENT_FORM.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.REIMBURSEMENT_FORM_VIEW.getAlias(), "", BasicConstant.ZERO),
    EXPENSE_LIST(XbbRefTypeEnum.REIMBURSEMENT_FORM.getCode(), DetailTabEnum.REIMBURSEMENT_EXPENSE, PlatFormEnum.ALL, ProPermissionAliasEnum.EXPENSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    EXPENSE_DETAIL(XbbRefTypeEnum.EXPENSE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.EXPENSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    ESIGN_UP(XbbRefTypeEnum.ESIGN.getCode(), DetailTabEnum.ESIGN_UP, PlatFormEnum.ALL, ProPermissionAliasEnum.ESIGN.getAlias(), "", BasicConstant.ZERO),


    // 市场活动(第三个是 市场活动关联的销售线索)
    MARKET_ACTIVITY_BASE_DETAIL(RedundantTemplateTypeEnum.MARKET_ACTIVITY.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.MARKET_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    MARKET_ACTIVITY__SALE_TEAM(RedundantTemplateTypeEnum.MARKET_ACTIVITY.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.MARKET_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    ACTIVITY_EFFECT(RedundantTemplateTypeEnum.MARKET_ACTIVITY.getCode(), DetailTabEnum.ACTIVITY_EFFECT, PlatFormEnum.WEB, ProPermissionAliasEnum.MARKET_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    SALE_CLUE(RedundantTemplateTypeEnum.MARKET_ACTIVITY.getCode(), DetailTabEnum.SALE_CLUE, PlatFormEnum.ALL, ProPermissionAliasEnum.MARKET_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    MARKET_ACTIVITY_FILE_CABINET(RedundantTemplateTypeEnum.MARKET_ACTIVITY.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.MA_ACTIVITY_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    MARKET_ACTIVITY_APPROVAL_RECORDS(XbbRefTypeEnum.MARKET_ACTIVITY.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.MARKET_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    MARKET_ACTIVITY_APPROVAL_PROCESS(RedundantTemplateTypeEnum.MARKET_ACTIVITY.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.MARKET_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    MARKET_ACTIVITY_APPROVAL_HISTORY(RedundantTemplateTypeEnum.MARKET_ACTIVITY.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.MARKET_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),

 // 线索
    CLUE_BASE_DETAIL(RedundantTemplateTypeEnum.CLUE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CLUE_VIEW.getAlias(), "", BasicConstant.ZERO),
    CLUE_SALE_TEAM(RedundantTemplateTypeEnum.CLUE.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.CLUE_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.clue_sale_team", BasicConstant.ZERO),
    CLUE_COMMUNICATE_RECORD(RedundantTemplateTypeEnum.CLUE.getCode(), DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.CUSTOMER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    CLUE_CALL_LOG(RedundantTemplateTypeEnum.CLUE.getCode(), DetailTabEnum.CALL_LOG, PlatFormEnum.ALL, null, "enum.businessDetailTab.specialMemo.customer_call_log", BasicConstant.ZERO),
    CLUE_STAGE(RedundantTemplateTypeEnum.CLUE.getCode(), DetailTabEnum.CUSTOMER_STAGE, PlatFormEnum.ALL, ProPermissionAliasEnum.CLUE_VIEW.getAlias(), "", BasicConstant.ZERO),
    CLUE_FILE_CABINET(XbbRefTypeEnum.CLUE.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.CLUE_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    CLUE_APPROVAL_RECORDS(XbbRefTypeEnum.CLUE.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.CLUE_VIEW.getAlias(), "", BasicConstant.ZERO),
    CLUE_APPROVAL_PROCESS(RedundantTemplateTypeEnum.CLUE.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CLUE_VIEW.getAlias(), "", BasicConstant.ZERO),
    CLUE_APPROVAL_HISTORY(RedundantTemplateTypeEnum.CLUE.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.CLUE_VIEW.getAlias(), "", BasicConstant.ZERO),

    //线索短信往来
    CLUE_SMS_SEND_AND_REPLY(XbbRefTypeEnum.CLUE.getCode(), DetailTabEnum.SMS_SEND_AND_REPLY, PlatFormEnum.WEB, null, "enum.businessDetailTab.specialMemo.work_order_sms_send_and_reply", BasicConstant.ZERO),



    SALE_BUNDLE_DETAIL(XbbRefTypeEnum.SALE_BUNDLE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.WEB, ProPermissionAliasEnum.SALE_BUNALE_VIEW.getAlias(), "", BasicConstant.ZERO),
    SALE_BUNDLE_MEMBER(XbbRefTypeEnum.SALE_BUNDLE.getCode(), DetailTabEnum.SALE_BUNDLE_MEMBER, PlatFormEnum.WEB, ProPermissionAliasEnum.SALE_BUNALE_VIEW.getAlias(), "", BasicConstant.ZERO),
    SALE_BUNDLE_PLUG_IN(XbbRefTypeEnum.SALE_BUNDLE.getCode(), DetailTabEnum.SALE_BUNDLE_PLUG_IN, PlatFormEnum.WEB, ProPermissionAliasEnum.SALE_BUNALE_VIEW.getAlias(), "", BasicConstant.ZERO),
    SALE_BUNDLE_ROBOT_LIST(XbbRefTypeEnum.SALE_BUNDLE.getCode(), DetailTabEnum.SALE_BUNDLE_ROBOT_LIST, PlatFormEnum.WEB, ProPermissionAliasEnum.SALE_BUNALE_VIEW.getAlias(), "", BasicConstant.ZERO),

    //营销工具
    MARKETING_ACTIVITY_TAB(RedundantTemplateTypeEnum.FULL_DISCOUNT_COUPON.getCode(), DetailTabEnum.MARKETING_ACTIVITY_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.MARKETING_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    MARKETING_ACTIVITY_APPLICABLE_OBJECTS(RedundantTemplateTypeEnum.FULL_DISCOUNT_COUPON.getCode(), DetailTabEnum.MARKETING_ACTIVITY_APPLICABLE_OBJECTS, PlatFormEnum.ALL, ProPermissionAliasEnum.MARKETING_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    MARKETING_ACTIVITY_INAPPLICABLE_GOODS(RedundantTemplateTypeEnum.FULL_DISCOUNT_COUPON.getCode(), DetailTabEnum.MARKETING_ACTIVITY_INAPPLICABLE_GOODS, PlatFormEnum.ALL, ProPermissionAliasEnum.MARKETING_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    MARKETING_ACTIVITY_PREVIEW(RedundantTemplateTypeEnum.FULL_DISCOUNT_COUPON.getCode(), DetailTabEnum.MARKETING_ACTIVITY_PREVIEW, PlatFormEnum.ALL, ProPermissionAliasEnum.MARKETING_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),

    PROMOTION_ACTIVITY_TAB(RedundantTemplateTypeEnum.SPECIAL_GOODS.getCode(), DetailTabEnum.PROMOTION_ACTIVITY_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.PROMOTION_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    PROMOTION_ACTIVITY_APPLICABLE_OBJECTS(RedundantTemplateTypeEnum.SPECIAL_GOODS.getCode(), DetailTabEnum.PROMOTION_ACTIVITY_APPLICABLE_OBJECTS, PlatFormEnum.ALL, ProPermissionAliasEnum.PROMOTION_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),
    PROMOTION_ACTIVITY_INAPPLICABLE_GOODS(RedundantTemplateTypeEnum.SPECIAL_GOODS.getCode(), DetailTabEnum.PROMOTION_ACTIVITY_APPLICABLE_GOODS, PlatFormEnum.ALL, ProPermissionAliasEnum.PROMOTION_ACTIVITY_VIEW.getAlias(), "", BasicConstant.ZERO),

    // 经销商
    DISTRIBUTOR_BASE_DETAIL(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.DISTRIBUTOR_VIEW.getAlias(), "", BasicConstant.ZERO),
    DISTRIBUTOR_CONTACT_TAB(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), DetailTabEnum.CONTACT_TAB, PlatFormEnum.WEB, ProPermissionAliasEnum.DISTRIBUTOR_CONTACT_VIEW.getAlias(), "", XbbRefTypeEnum.DISTRIBUTOR_CONTACT.getCode()),
    DISTRIBUTOR_COMMUNICATE_TAB(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.DISTRIBUTOR_COMMUNICATE_VIEW.getAlias(), "", XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode()),
    DISTRIBUTOR_ACCOUNT_TAB(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), DetailTabEnum.DISTRIBUTOR_ACCOUNT, PlatFormEnum.ALL, ProPermissionAliasEnum.DISTRIBUTOR_ACCOUNT_VIEW.getAlias(), "", XbbRefTypeEnum.DISTRIBUTOR_ACCOUNT.getCode()),
    DISTRIBUTOR_PAYMENT(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), DetailTabEnum.PAYMENT_MANAGEMENT, PlatFormEnum.ALL, ProPermissionAliasEnum.FUND_MANAGEMENT.getAlias(), "", XbbRefTypeEnum.PAYMENT_MANAGEMENT.getCode()),
    DISTRIBUTOR_INVOICE_HISTORY(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), DetailTabEnum.INVOICE_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    DISTRIBUTOR_DISTRIBUTOR_INVOICE(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), DetailTabEnum.CUSTOMER_INVOICE, PlatFormEnum.ALL, null, "", BasicConstant.ZERO),
    DISTRIBUTOR_APPROVAL_RECORDS(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.DISTRIBUTOR_VIEW.getAlias(), "", BasicConstant.ZERO),
    DISTRIBUTOR_APPROVAL_PROCESS(RedundantTemplateTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.DISTRIBUTOR_VIEW.getAlias(), "", BasicConstant.ZERO),
    DISTRIBUTOR_APPROVAL_HISTORY(RedundantTemplateTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.DISTRIBUTOR_VIEW.getAlias(), "", BasicConstant.ZERO),


    DISTRIBUTOR_CONTACT_BASE_DETAIL(XbbRefTypeEnum.DISTRIBUTOR_CONTACT.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.DISTRIBUTOR_CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    DISTRIBUTOR_CONTACT_COMMUNICATE_RECORD(XbbRefTypeEnum.DISTRIBUTOR_CONTACT.getCode(), DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.DISTRIBUTOR_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    DISTRIBUTOR_CONTACT_APPROVAL_RECORDS(XbbRefTypeEnum.DISTRIBUTOR_CONTACT.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.DISTRIBUTOR_CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    DISTRIBUTOR_CONTACT_APPROVAL_PROCESS(RedundantTemplateTypeEnum.DISTRIBUTOR_CONTACT.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.DISTRIBUTOR_CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),
    DISTRIBUTOR_CONTACT_APPROVAL_HISTORY(RedundantTemplateTypeEnum.DISTRIBUTOR_CONTACT.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.DISTRIBUTOR_CONTACT_VIEW.getAlias(), "", BasicConstant.ZERO),


    // 经销商跟进记录
    DISTRIBUTOR_COMMUNICATE_DETAIL(XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.DISTRIBUTOR_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    DISTRIBUTOR_COMMUNICATE_FILE_CABINET(XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.DISTRIBUTOR_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    DISTRIBUTOR_COMMUNICATE_COMMENT(XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode(), DetailTabEnum.COMMENT, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.DISTRIBUTOR_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    DISTRIBUTOR_COMMUNICATE_LIKE(XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode(), DetailTabEnum.LIKE, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.DISTRIBUTOR_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),

    DISTRIBUTOR_ACCOUNT_BASE_DETAIL(XbbRefTypeEnum.DISTRIBUTOR_ACCOUNT.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.DISTRIBUTOR_ACCOUNT_VIEW.getAlias(), "", BasicConstant.ZERO),

    //订货单
    ORDER_BASE_DETAIL(XbbRefTypeEnum.ORDER.getCode(),DetailTabEnum.BASE_DETAIL_TAB,PlatFormEnum.ALL,ProPermissionAliasEnum.ORDER_VIEW.getAlias(),"",BasicConstant.ZERO),
    ORDER_SALE_TEAM(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    ORDER_COMMUNICATE_RECORD(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.COMMUNICATE_RECORD, PlatFormEnum.ALL, ProPermissionAliasEnum.CUSTOMER_COMMUNICATE_VIEW.getAlias(), "", BasicConstant.ZERO),
    ORDER_PAYMENT(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.PAYMENT_MANAGEMENT, PlatFormEnum.ALL, ProPermissionAliasEnum.FUND_MANAGEMENT.getAlias(), "", XbbRefTypeEnum.PAYMENT_MANAGEMENT.getCode()),
    ORDER_INVOICE_HISTORY(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.INVOICE_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),
    ORDER_FILE_CABINET(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    ORDER_PERFORMANCE(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.PERFORMANCE, PlatFormEnum.WEB, ProPermissionAliasEnum.ORDER_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.contract_performance", BasicConstant.ZERO),
    ORDER_WORK_ORDER_LOG(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.WORK_ORDER_LOG, PlatFormEnum.ALL, ProPermissionAliasEnum.WORK_ORDER_VIEW.getAlias(), "", XbbRefTypeEnum.WORK_ORDER.getCode()),
    ORDER_OUTSTOCK_TAB(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.OUTSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    ORDER_COUPON_TAB(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.COUPON_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    ORDER_REFUND(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.REFUND, PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_VIEW.getAlias(), "enum.businessDetailTab.specialMemo.contract_refund", XbbRefTypeEnum.REFUND.getCode()),
    ORDER_APPROVAL_RECORDS(XbbRefTypeEnum.ORDER.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    ORDER_APPROVAL_PROCESS(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),
    ORDER_APPROVAL_HISTORY(RedundantTemplateTypeEnum.ORDER.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.ORDER_VIEW.getAlias(), "", BasicConstant.ZERO),

    //退货单
    RETURN_BASE_DETAIL(XbbRefTypeEnum.RETURN.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.RETURN_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURN_SALE_TEAM(RedundantTemplateTypeEnum.RETURN.getCode(), DetailTabEnum.SALE_TEAM, PlatFormEnum.WEB, ProPermissionAliasEnum.RETURN_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURN_RED_PAYMENT_SHEET(RedundantTemplateTypeEnum.RETURN.getCode(), DetailTabEnum.RED_PAYMENT_SHEET, PlatFormEnum.ALL, ProPermissionAliasEnum.PAYMENT_SHEET_VIEW.getAlias(), "", XbbRefTypeEnum.RED_PAYMENT_SHEET.getCode()),

    RETURN_RELEVANT_INVALID_INVOICE(RedundantTemplateTypeEnum.RETURN.getCode(), DetailTabEnum.RELEVANT_INVALID_INVOICE, PlatFormEnum.ALL, ProPermissionAliasEnum.INVOICE_VIEW.getAlias(), "", BasicConstant.ZERO),

    RETURN_RED_PAYMENT(RedundantTemplateTypeEnum.RETURN.getCode(), DetailTabEnum.RED_PAYMENT, PlatFormEnum.ALL, ProPermissionAliasEnum.RED_RECEIVABLES.getAlias(), "", XbbRefTypeEnum.PAYMENT.getCode()),

    RETURN_PERFORMANCE(RedundantTemplateTypeEnum.RETURN.getCode(), DetailTabEnum.PERFORMANCE, PlatFormEnum.WEB, ProPermissionAliasEnum.RETURN_VIEW.getAlias(), "仅在开启业绩分配时展示", BasicConstant.ZERO),
    RETURN_INSTOCK_TAB(RedundantTemplateTypeEnum.RETURN.getCode(), DetailTabEnum.INSTOCK_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_INSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURN_FILE_CABINET(RedundantTemplateTypeEnum.RETURN.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.RETURN_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURN_APPROVAL_RECORDS(XbbRefTypeEnum.RETURN.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.RETURN_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURN_APPROVAL_PROCESS(RedundantTemplateTypeEnum.RETURN.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.RETURN_VIEW.getAlias(), "", BasicConstant.ZERO),
    RETURN_APPROVAL_HISTORY(RedundantTemplateTypeEnum.RETURN.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.RETURN_VIEW.getAlias(), "", BasicConstant.ZERO),


    /**
     * 对账单
     */
    STATEMENT_BASEINFO(XbbRefTypeEnum.CUSTOMER_STATEMENT_STATISTIC.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.VIEW_STATEMENT.getAlias(), "", XbbRefTypeEnum.CUSTOMER_STATEMENT_STATISTIC.getCode()),

    STATEMENT_DETAIL(XbbRefTypeEnum.CUSTOMER_STATEMENT_STATISTIC.getCode(), DetailTabEnum.STATEMENT_DETAIL, PlatFormEnum.ALL, ProPermissionAliasEnum.VIEW_STATEMENT.getAlias(), "", XbbRefTypeEnum.CUSTOMER_STATEMENT_STATISTIC.getCode()),

    ORDER_OUTSTOCK_BASE_DETAIL(RedundantTemplateTypeEnum.ORDER_OUTSTOCK.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),
    ORDER_OUTSTOCK_FILE_CABINET(RedundantTemplateTypeEnum.ORDER_OUTSTOCK.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_OUTSTOCK_VIEW.getAlias(), "", BasicConstant.ZERO),


    /**
     * 支付流水
     */
    ONLINE_PAYMENT_FLOW_BASE_DETAIL(XbbRefTypeEnum.ONLINE_PAYMENT_FLOW.getCode(), DetailTabEnum.BASE_DETAIL_TAB,  PlatFormEnum.ALL, ProPermissionAliasEnum.ONLINE_PAYMENT_FLOW_VIEW.getAlias(), "", BasicConstant.ZERO),

    //调拨单
    FUND_TRANSFER_DETAIL(XbbRefTypeEnum.FUND_TRANSFER.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.FUND_TRANSFER_VIEW.getAlias(), "", BasicConstant.ZERO),
    FUND_TRANSFER_CABINET(XbbRefTypeEnum.FUND_TRANSFER.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.FUND_TRANSFER_VIEW.getAlias(), "", BasicConstant.ZERO),
    FUND_TRANSFER_APPROVAL_RECORDS(XbbRefTypeEnum.FUND_TRANSFER.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.FUND_TRANSFER_VIEW.getAlias(), "", BasicConstant.ZERO),
    FUND_TRANSFER_APPROVAL_PROCESS(RedundantTemplateTypeEnum.FUND_TRANSFER.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.FUND_TRANSFER_VIEW.getAlias(), "", BasicConstant.ZERO),
    FUND_TRANSFER_APPROVAL_HISTORY(RedundantTemplateTypeEnum.FUND_TRANSFER.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.FUND_TRANSFER_VIEW.getAlias(), "", BasicConstant.ZERO),

    //其他收入单
    OTHER_INCOME_BASE_DETAIL(XbbRefTypeEnum.OTHER_INCOME.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.OTHER_INCOME_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_INCOME_RED_HISTORY(XbbRefTypeEnum.OTHER_INCOME.getCode(), DetailTabEnum.OTHER_INCOME_RED_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.OTHER_INCOME_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_INCOME_CABINET(RedundantTemplateTypeEnum.OTHER_INCOME.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.OTHER_INCOME_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_INCOME_APPROVAL_RECORDS(XbbRefTypeEnum.OTHER_INCOME.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.OTHER_INCOME_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_INCOME_APPROVAL_PROCESS(RedundantTemplateTypeEnum.OTHER_INCOME.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.OTHER_INCOME_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_INCOME_APPROVAL_HISTORY(RedundantTemplateTypeEnum.OTHER_INCOME.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.OTHER_INCOME_VIEW.getAlias(), "", BasicConstant.ZERO),

    //其他支出单
    OTHER_EXPENSE_BASE_DETAIL(XbbRefTypeEnum.OTHER_EXPENSE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.OTHER_EXPENSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_EXPENSE_RED_HISTORY(XbbRefTypeEnum.OTHER_EXPENSE.getCode(), DetailTabEnum.OTHER_EXPENSE_RED_HISTORY, PlatFormEnum.ALL, ProPermissionAliasEnum.OTHER_EXPENSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_EXPENSE_CABINET(RedundantTemplateTypeEnum.OTHER_EXPENSE.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.OTHER_EXPENSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_EXPENSE_APPROVAL_RECORDS(XbbRefTypeEnum.OTHER_EXPENSE.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.OTHER_EXPENSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_EXPENSE_APPROVAL_PROCESS(RedundantTemplateTypeEnum.OTHER_EXPENSE.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.OTHER_EXPENSE_VIEW.getAlias(), "", BasicConstant.ZERO),
    OTHER_EXPENSE_APPROVAL_HISTORY(RedundantTemplateTypeEnum.OTHER_EXPENSE.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.OTHER_EXPENSE_VIEW.getAlias(), "", BasicConstant.ZERO),

    // 调整单
    COST_ADJUST_BASE_DETAIL(RedundantTemplateTypeEnum.COST_ADJUST.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.COST_ADJUST_VIEW.getAlias(), "", BasicConstant.ZERO),
    COST_ADJUST_FILE_CABINET(RedundantTemplateTypeEnum.COST_ADJUST.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.COST_ADJUST_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),
    COST_ADJUST_APPROVAL_RECORDS(XbbRefTypeEnum.COST_ADJUST.getCode(), DetailTabEnum.APPROVAL_RECORDS, PlatFormEnum.WEB, ProPermissionAliasEnum.COST_ADJUST_VIEW.getAlias(), "", BasicConstant.ZERO),
    COST_ADJUST_APPROVAL_PROCESS(RedundantTemplateTypeEnum.COST_ADJUST.getCode(), DetailTabEnum.APPROVAL_PROCESS, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.COST_ADJUST_VIEW.getAlias(), "", BasicConstant.ZERO),
    COST_ADJUST_APPROVAL_HISTORY(RedundantTemplateTypeEnum.COST_ADJUST.getCode(), DetailTabEnum.APPROVAL_HISTORY, PlatFormEnum.DINGTALK, ProPermissionAliasEnum.COST_ADJUST_VIEW.getAlias(), "", BasicConstant.ZERO),

    // 知识条目
    KNOWLEDGE_BASE_DETAIL(XbbRefTypeEnum.KNOWLEDGE_BASE.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, null, "", BasicConstant.ZERO),
    // 竞争对手
    COMPETITOR_BASE_DETAIL(RedundantTemplateTypeEnum.COMPETITOR.getCode(), DetailTabEnum.BASE_DETAIL_TAB, PlatFormEnum.ALL, ProPermissionAliasEnum.COMPETITOR_VIEW.getAlias(), "", BasicConstant.ZERO),
    COMPETITOR_PANORAMIC_ANALYSIS(RedundantTemplateTypeEnum.COMPETITOR.getCode(), DetailTabEnum.COMPETITOR_PANORAMIC_ANALYSIS, PlatFormEnum.WEB, ProPermissionAliasEnum.COMPETITOR_VIEW.getAlias(), "", BasicConstant.ZERO),
    COMPETITOR_VISIBLE_RANGE(RedundantTemplateTypeEnum.COMPETITOR.getCode(), DetailTabEnum.COMPETITOR_VISBLE_RANGE, PlatFormEnum.WEB, ProPermissionAliasEnum.COMPETITOR_VIEW.getAlias(), "", BasicConstant.ZERO),
    COMPETITOR_LINKED_OPPORTUNITY(RedundantTemplateTypeEnum.COMPETITOR.getCode(), DetailTabEnum.COMPETITOR_LINKED_OPPORTUNITY, PlatFormEnum.ALL, ProPermissionAliasEnum.OPPORTUNITY_VIEW.getAlias(), "", XbbRefTypeEnum.SALES_OPPORTUNITY.getCode()),
    COMPETITOR_FILE_CABINET(RedundantTemplateTypeEnum.COMPETITOR.getCode(), DetailTabEnum.FILE_CABINET, PlatFormEnum.ALL, ProPermissionAliasEnum.COMPETITOR_FILE_CABINET_VISIBLE.getAlias(), "", BasicConstant.ZERO),

    ;

    private Integer businessType;
    private DetailTabEnum anEnum;
    private PlatFormEnum platform;
    private String permission;
    private String specialMemo;
    private Integer formBusinessType;

    BusinessDetailTabEnum(Integer businessType, DetailTabEnum anEnum, PlatFormEnum platform, String permission, String specialMemo, Integer formBusinessType) {
        this.businessType = businessType;
        this.anEnum = anEnum;
        this.platform = platform;
        this.permission = permission;
        this.specialMemo = specialMemo;
        this.formBusinessType = formBusinessType;
    }

    /**
     * 获取Web详情页Tab
     *
     * @param businessType 业务
     * @return List
     * @author GuoJun.HU
     * @date 2019/3/21 15:30
     * @since V1.0
     */
    public static List<BusinessDetailTabEnum> getByBusinessType(Integer businessType) {
        List<BusinessDetailTabEnum> list = new ArrayList<>();
        for (BusinessDetailTabEnum tabEnum : BusinessDetailTabEnum.values()) {
            boolean webTab = Objects.equals(businessType, tabEnum.getBusinessType()) &&
                    (Objects.equals(PlatFormEnum.ALL, tabEnum.getPlatform()) || Objects.equals(PlatFormEnum.WEB, tabEnum.getPlatform()));
            if (webTab) {
                list.add(tabEnum);
            }
        }
        return list;
    }


    /**
     * 获取Web和dingtalk详情页Tab
     *
     * @param businessType 业务
     * @return List
     * @author 吴峰
     * @date 2022/5/18 11:30
     * @since V1.0
     */
    public static List<BusinessDetailTabEnum> getTabByBusinessTypeAndPermission(Integer businessType, Set<String> permissions, String platform) {
        List<BusinessDetailTabEnum> list;
        if (Objects.equals(platform, PlatFormEnum.WEB.getValue())) {
            list = BusinessDetailTabEnum.getByBusinessTypeAndPermission(businessType, permissions);
        } else {
            list = BusinessDetailTabEnum.getByBusinessTypeAndPermissionForDingtalk(businessType, permissions);
        }
        return list;
    }

    /**
     * 获取Web详情页Tab
     *
     * @param businessType 业务
     * @return List
     * @author GuoJun.HU
     * @date 2019/3/21 15:30
     * @since V1.0
     */
    public static List<BusinessDetailTabEnum> getByBusinessTypeAndPermission(Integer businessType, Set<String> permissions) {
        List<BusinessDetailTabEnum> list = new ArrayList<>();
        for (BusinessDetailTabEnum tabEnum : BusinessDetailTabEnum.values()) {
            boolean webTab = Objects.equals(businessType, tabEnum.getBusinessType()) &&
                    (Objects.equals(PlatFormEnum.ALL, tabEnum.getPlatform()) || Objects.equals(PlatFormEnum.WEB, tabEnum.getPlatform()));
            boolean hasPermission = true;
            if (Objects.nonNull(tabEnum.getPermission())) {
                hasPermission = permissions.contains(tabEnum.getPermission());
            }
            if (webTab && hasPermission) {
                list.add(tabEnum);
            } else if (webTab && Objects.equals(tabEnum.getAnEnum().getKey(), DetailTabEnum.CONTRACT_COMPARE.getKey())) {
                list.add(tabEnum);
            }
        }
        return list;
    }

    /**
     * 获取dingtalk详情页Tab
     *
     * @param businessType 业务
     * @return List
     * @author GuoJun.HU
     * @date 2019/3/21 15:30
     * @since V1.0
     */
    public static List<BusinessDetailTabEnum> getByBusinessTypeForDingtalk(Integer businessType) {
        List<BusinessDetailTabEnum> list = new ArrayList<>();
        for (BusinessDetailTabEnum tabEnum : BusinessDetailTabEnum.values()) {
            boolean dingtalkTab = Objects.equals(businessType, tabEnum.getBusinessType()) &&
                    (Objects.equals(PlatFormEnum.ALL, tabEnum.getPlatform()) || Objects.equals(PlatFormEnum.DINGTALK, tabEnum.getPlatform()));
            if (dingtalkTab) {
                list.add(tabEnum);
            }
        }
        return list;
    }

    /**
     * 获取dingtalk详情页Tab
     *
     * @param businessType 业务
     * @return List
     * @author GuoJun.HU
     * @date 2019/3/21 15:30
     * @since V1.0
     */
    public static List<BusinessDetailTabEnum> getByBusinessTypeAndPermissionForDingtalk(Integer businessType, Set<String> permissions) {
        List<BusinessDetailTabEnum> list = new ArrayList<>();
        for (BusinessDetailTabEnum tabEnum : BusinessDetailTabEnum.values()) {
            boolean dingtalkTab = Objects.equals(businessType, tabEnum.getBusinessType()) &&
                    (Objects.equals(PlatFormEnum.ALL, tabEnum.getPlatform()) || Objects.equals(PlatFormEnum.DINGTALK, tabEnum.getPlatform()));
            boolean hasPermission = true;
            if (Objects.nonNull(tabEnum.getPermission())) {
                hasPermission = permissions.contains(tabEnum.getPermission());
            }
            if (dingtalkTab && hasPermission) {
                list.add(tabEnum);
            }
        }
        return list;
    }

    public String getSpecialMemo() {
        return I18nMessageUtil.getMessage(specialMemo);
    }

    /**
     * 获取对应businessType的alias
     * @param tabEnumList
     * @return
     */
    public static List<String> getAliasIn(List<BusinessDetailTabEnum> tabEnumList) {
        // 获取对应businessType的alias
        List<String> aliasIn = new ArrayList<>();
        tabEnumList.forEach(item ->{
            if (item.getFormBusinessType() != 0){
                aliasIn.add(XbbRefTypeEnum.getByCode(item.getFormBusinessType()).getAlias());
            }
        });
        return aliasIn;
    }
}
